
import os
if __name__ == '__main__':

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ServiceConn.settings")
    import django
    django.setup()
    from serviceinfo import models
    print(models.Configuration.objects.all())

    aa = {'app_type': 1, 'optimize_type': 1, 'optimize_detail': None, 'system_release': 1, 'java_version': 18, 'cpu': 1, 'mem': 2, 'configcenter_type': 1, 'configcenter_addr': 'qqq', 'node_num': 1, 'interface_type': '[]', 'group_id': 1, 'hostname': '', 'port': 23, 'request_path': "/", 'service_path': "/", 'env_type': 1, 'sername_id': 61}

    cc = models.Configuration.objects.create(**aa)
    print(cc)